﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MensUnoShop.Models.ViewModels.OrderViewModel>" %>
<%@ Import Namespace="MensUnoShop.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	men'suno SHOP
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="CART_CONTENT">
<img src="/Content/page_img/cart_content_top.gif" />
<div class="CART_TITLE">
<h1 class="TITLE_CHECK_ORDER">訂單查詢</h1>
<span class="FAVORITE_BT_CART"><a href="/market/c">檢視購物車</a></span>
<br class="CLEAR" />
</div>
<div class="CART_FORM">
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">下單日期</div></td>
    <td><div align="center">訂單編號</div></td>
    <td><div align="center">商品出貨情形</div></td>
    <td><div align="center">訂單金額</div></td>
    <td><div align="center">辦理退貨</div></td>
    <td><div align="center">出貨單號</div></td>
  </tr>
  <%foreach (var o in Model.ODLIST)
    { %>
  <tr>
    <td><div align="center"><%:o.DATEIN.ToShortDateString() %></div></td>
    <td><div align="center"><a href="/order/querydetail/<%:o.TXID %>"><%:o.TXID %></a></div></td>
    <td valign="top"><div align="center"><%:Html.GetOrderStatus(o.STATUS) %></div></td>
    <td><div align="center">NT$<%:o.PRICE %></div></td>
    <td><div align="center">
      <%if(o.STATUS==MensUnoShop.Models.Config.OrderStatusType.Shipping && (o.SHIPPINGDATE-DateTime.Today).Days<=20){ %>
      <form action="" method="post">
        <input type="hidden" name="txid" value="<%:o.TXID %>" />
        <input type="submit" name="button" id="submit" value="退貨" />
      </form>
      <%} %>
    </div></td>
    <td><div align="center"><%:o.SHIPPINGNUMBER %></div></td>
  </tr>
  <%} %>
</table>
<div class="BUYER_INFO"></div>
</div>
<br class="CLEAR" />
<img src="/Content/page_img/cart_content_bottom.gif" /></div>
</asp:Content>
